from django.db import models
from utils.models import BaseModel


class Area(models.Model):
    """行政区划分"""
    name = models.CharField(max_length=20)
    parent = models.ForeignKey('self', related_name='subs', null=True, blank=True)

    class Meta:
        db_table = 'tb_areas'
        verbose_name = '行政区划'
        verbose_name_plural = '行政区划'

    def __str__(self):
        return self.name